package com.eu.ebpm.engine.entity.deploy;

import java.util.Date;
import java.util.List;

import com.eu.ebpm.engine.entity.BaseEntity;

/**
 * 流程部署信息
 * 
 * @author 王晓华
 *
 */
public class Deploy extends BaseEntity {

	private String key;

	private String name;

	private String desc;

	private Integer version;

	private Date createTime;

	private Long parentId;

	private Long rootId;

	public String defineFile;

	private Boolean active;

	private String jsonData;

	// 关联部署信息
	private List<Mission> missions;
	private Mission startMission;

	public Deploy() {
	}

	public Deploy(String key_, String name, String desc_, int version, Date createTime, long parentId, Long rootId, String xmlContent, String jsonData) {
		this.initId();
		this.key = key_;
		this.name = name;
		this.desc = desc_;
		this.version = version;
		this.createTime = createTime;
		this.parentId = parentId;
		this.rootId = rootId;
		this.defineFile = xmlContent;
		this.jsonData = jsonData;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public String getDefineFile() {
		return defineFile;
	}

	public void setDefineFile(String defineFile) {
		this.defineFile = defineFile;
	}

	public long getParentId() {
		return parentId;
	}

	public void setParentId(long parentId) {
		this.parentId = parentId;
	}

	public Mission getStartMission() {
		return startMission;
	}

	public void setStartMission(Mission startMission) {
		this.startMission = startMission;
	}

	public List<Mission> getMissions() {
		return missions;
	}

	public void setMissions(List<Mission> missions) {
		this.missions = missions;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Long getRootId() {
		return rootId;
	}

	public void setRootId(Long rootId) {
		this.rootId = rootId;
	}

	public String getJsonData() {
		return jsonData;
	}

	public void setJsonData(String jsonData) {
		this.jsonData = jsonData;
	}

	@Override
	public String toString() {
		return "Deploy [key=" + key + ", name=" + name + ", desc=" + desc + ", version=" + version + ", createTime=" + createTime + ", parentId=" + parentId + ", rootId=" + rootId + ", active="
				+ active + "]";
	}

}
